#include <stdio.h>
#include "gui_form.h"

volatile GUI_FormType const *Gui_FormCurrent = &Gui_FrmMainmenu;

void GUI_FormExec(const GUI_FormType *frm)
{
	if(frm == NULL)
	{
		return;
	}

//	if(Gui_FormCurrent->unload != NULL)
//	{
//		Gui_FormCurrent->unload();
//	}
	
	Gui_FormCurrent = frm;
	
	if(Gui_FormCurrent->load != NULL)
	{
		Gui_FormCurrent->load();
	}
	
	if(Gui_FormCurrent->draw != NULL)
	{
		Gui_FormCurrent->draw();
	}
}
